#!/bin/sh
# Copies "vanilla" JARs into $REVDIR/REVISION for testing purposes.

# 1. Start and loading configuration
test -r autotest.conf || {
 echo "$0: Cannot find autotest.conf (make sure you edit autotest.conf.dist first)"
 exit 127
 }
test -r autotest.conf && . ./autotest.conf

DESKTOP_AUTOBUILDDIR=../../../desktop/scripts/autobuild
DESKTOP_BUILDDIR=../../../desktop/build
DESKTOPDIR=../../../desktop
REVISION=`./myrevision`
COMMONDIR=../../../common/src/geogebra/common/
mkdir -p $REVDIR/$REVISION
$DESKTOP_AUTOBUILDDIR/make-vanilla-jars -c -j $JAVA_HOME -J 2 -pr

cp $DESKTOP_BUILDDIR/*.jar $REVDIR/$REVISION
cat $DESKTOPDIR/.ecjlog | grep -A 3 "\. ERROR" > $REVDIR/$REVISION/ecjerrors && exit 1

exit 0
